// QueryNozzleParmCommand.cpp: implementation of the QueryNozzleParmCommand class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
//#include "commandmodule.h"
#include "QueryNozzleParmCommand.h"
#include "NozzleSelector.h"
#include "queryparmdlg.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

QueryNozzleParmCommand::QueryNozzleParmCommand()
{

}

QueryNozzleParmCommand::~QueryNozzleParmCommand()
{

}

BOOL QueryNozzleParmCommand::Execute()
{
	if (!GetSelectedNozzle())
	{
		return FALSE;
	}
	QueryParmDlg dlg;
	dlg.DoModal();
	return TRUE;
}

BOOL QueryNozzleParmCommand::GetSelectedNozzle()
{
	NozzleSelector select;
	BOOL bResult = select.Select();
	if( !bResult )
	{
		return FALSE;
	}

	m_pNozzle = select.GetSelected();
	return TRUE;
}
